package com.devilvan.betrice.lol.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.devilvan.betrice.common.BasePo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serial;
import java.io.Serializable;

/**
 * @author Evad.Wu
 * @Description LOL-对局英雄信息 映射
 * @date 2022-09-30
 */
@Setter
@Getter
@ToString(exclude = {"lolBattleHeaderPo", "lolBattleHonourPo"})
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "LOL_BATTLE_CHAMPION")

@Entity
@Table(name = "LOL_BATTLE_CHAMPION")
@DynamicInsert
@EntityListeners(AuditingEntityListener.class)
@Schema(description = "LOL-对局英雄信息 映射")
public class LolBattleChampionPo extends BasePo implements Serializable {
    @Serial
    private static final long serialVersionUID = -3623386060459799937L;
    @Schema(description = "对局ID")
    @TableField(value = "GAME_ID")
    @Column(name = "GAME_ID", columnDefinition = "BIGINT(19) NOT NULL COMMENT '对局ID'")
    private Long gameId;
    @Schema(description = "QQ号")
    @TableField(value = "OPEN_ID")
    @Column(name = "OPEN_ID", columnDefinition = "VARCHAR(64) COMMENT 'QQ号'")
    private String openId;
    @Schema(description = "用户名")
    @TableField(value = "NAME")
    @Column(name = "NAME", columnDefinition = "VARCHAR(32) COMMENT '用户名'")
    private String name;
    @Schema(description = "是否胜利（1-胜利，2-失败）")
    @TableField(value = "WIN")
    @Column(name = "WIN", columnDefinition = "BIT(1) COMMENT '是否胜利（1-胜利，0-失败）'")
    private Boolean win;
    @Schema(description = "英雄ID")
    @TableField(value = "CHAMPION_ID")
    @Column(name = "CHAMPION_ID", columnDefinition = "INT(10) COMMENT '英雄ID'")
    private Integer championId;
    @Schema(description = "英雄熟练度")
    @TableField(value = "CHAMPION_USED_EXP")
    @Column(name = "CHAMPION_USED_EXP", columnDefinition = "BIGINT(19) COMMENT '英雄熟练度'")
    private Long championUsedExp;
    @Schema(description = "几号皮肤")
    @TableField(value = "SKIN_INDEX")
    @Column(name = "SKIN_INDEX", columnDefinition = "INT(10) COMMENT '几号皮肤'")
    private Integer skinIndex;
    @Schema(description = "杀敌数")
    @TableField(value = "CHAMPIONS_KILLED")
    @Column(name = "CHAMPIONS_KILLED", columnDefinition = "INT(10) COMMENT '杀敌数'")
    private Integer championsKilled;
    @Schema(description = "死亡数")
    @TableField(value = "NUM_DETHS")
    @Column(name = "NUM_DEATHS", columnDefinition = "INT(10) COMMENT '死亡数'")
    private Integer numDeaths;
    @Schema(description = "助攻数")
    @TableField(value = "ASSISTS")
    @Column(name = "ASSISTS", columnDefinition = "INT(10) COMMENT '助攻数'")
    private Integer assists;
    @Schema(description = "100-左下角蓝色方, 200-右上角红色方")
    @TableField(value = "TEAM")
    @Column(name = "TEAM", columnDefinition = "VARCHAR(8) COMMENT '蓝色方/红色方'")
    private String team;
    @Schema(description = "小龙击杀数")
    @TableField(value = "DRAGON_KILLS")
    @Column(name = "DRAGON_KILLS", columnDefinition = "INT(10) COMMENT '小龙击杀数'")
    private Integer dragonKills;
    @Schema(description = "位置")
    @TableField(value = "POSITION")
    @Column(name = "POSITION", columnDefinition = "VARCHAR(16) COMMENT '位置'")
    private String position;
    @Schema(description = "等级")
    @TableField(value = "LEVEL")
    @Column(name = "LEVEL", columnDefinition = "INT(10) COMMENT '等级'")
    private Integer level;
    @Schema(description = "补刀")
    @TableField(value = "ALL_MINIONS_KILLED")
    @Column(name = "ALL_MINIONS_KILLED", columnDefinition = "INT(10) COMMENT '补刀'")
    private Integer allMinionsKilled;
    @Schema(description = "击杀大龙数量")
    @TableField(value = "BARON_KILLS")
    @Column(name = "BARON_KILLS", columnDefinition = "INT(10) COMMENT '击杀大龙数量'")
    private Integer baronKills;
    @Schema(description = "最大连杀")
    @TableField(value = "LARGEST_KILLING_SPREE")
    @Column(name = "LARGEST_KILLING_SPREE", columnDefinition = "INT(10) COMMENT '最大连杀'")
    private Integer largestKillingSpree;
    @Schema(description = "最大多杀")
    @TableField(value = "LARGEST_MULTI_KILL")
    @Column(name = "LARGEST_MULTI_KILL", columnDefinition = "INT(10) COMMENT '最大多杀'")
    private Integer largestMultiKill;
    @Schema(description = "双杀数")
    @TableField(value = "DOUBLE_KILLS")
    @Column(name = "DOUBLE_KILLS", columnDefinition = "INT(10) COMMENT '双杀数'")
    private Integer doubleKills;
    @Schema(description = "三杀数")
    @TableField(value = "TRIPLE_KILLS")
    @Column(name = "TRIPLE_KILLS", columnDefinition = "INT(10) COMMENT '三杀数'")
    private Integer tripleKills;
    @Schema(description = "四杀数")
    @TableField(value = "QUADRA_KILLS")
    @Column(name = "QUADRA_KILLS", columnDefinition = "INT(10) COMMENT '四杀数'")
    private Integer quadraKills;
    @Schema(description = "五杀数")
    @TableField(value = "PENTA_KILLS")
    @Column(name = "PENTA_KILLS", columnDefinition = "INT(10) COMMENT '五杀数'")
    private Integer pentaKills;
    @Schema(description = "控制得分")
    @TableField(value = "TIME_CCING_OTHERS")
    @Column(name = "TIME_CCING_OTHERS", columnDefinition = "INT(10) COMMENT '控制得分'")
    private Integer timeCcingOthers;
    @Schema(description = "对英雄造成的总伤害")
    @TableField(value = "TOTAL_DAMAGE_TO_CHAMPIONS")
    @Column(name = "TOTAL_DAMAGE_TO_CHAMPIONS", columnDefinition = "INT(10) COMMENT '对英雄造成的总伤害'")
    private Integer totalDamageToChampions;
    @Schema(description = "对英雄造成的物理伤害")
    @TableField(value = "PHYSICAL_DAMAGE_TO_CHAMPIONS")
    @Column(name = "PHYSICAL_DAMAGE_TO_CHAMPIONS", columnDefinition = "INT(10) COMMENT '对英雄造成的物理伤害'")
    private Integer physicalDamageToChampions;
    @Schema(description = "对英雄造成的魔法伤害")
    @TableField(value = "MAGIC_DAMAGE_TO_CHAMPIONS")
    @Column(name = "MAGIC_DAMAGE_TO_CHAMPIONS", columnDefinition = "INT(10) COMMENT '对英雄造成的魔法伤害'")
    private Integer magicDamageToChampions;
    @Schema(description = "对英雄的真实伤害")
    @TableField(value = "TRUE_DAMAGE_TO_CHAMPIONS")
    @Column(name = "TRUE_DAMAGE_TO_CHAMPIONS", columnDefinition = "INT(10) COMMENT '对英雄的真实伤害'")
    private Integer trueDamageToChampions;
    @Schema(description = "总输出伤害")
    @TableField(value = "TOTAL_DAMAGE_DEALT")
    @Column(name = "TOTAL_DAMAGE_DEALT", columnDefinition = "INT(10) COMMENT '总输出伤害'")
    private Integer totalDamageDealt;
    @Schema(description = "总物理伤害")
    @TableField(value = "PHYSICAL_DAMAGE_DEALT_PLAYER")
    @Column(name = "PHYSICAL_DAMAGE_DEALT_PLAYER", columnDefinition = "INT(10) COMMENT '总物理伤害'")
    private Integer physicalDamageDealtPlayer;
    @Schema(description = "总魔法伤害")
    @TableField(value = "MAGIC_DAMAGE_DEALT_PLAYER")
    @Column(name = "MAGIC_DAMAGE_DEALT_PLAYER", columnDefinition = "INT(10) COMMENT '总魔法伤害'")
    private Integer magicDamageDealtPlayer;
    @Schema(description = "最大暴击伤害")
    @TableField(value = "LARGEST_CRITICAL_STRIKE")
    @Column(name = "LARGEST_CRITICAL_STRIKE", columnDefinition = "INT(10) COMMENT '最大暴击伤害'")
    private Integer largestCriticalStrike;
    @Schema(description = "总治疗数")
    @TableField(value = "TOTAL_HEALTH")
    @Column(name = "TOTAL_HEALTH", columnDefinition = "INT(10) COMMENT '总治疗数'")
    private Integer totalHealth;
    @Schema(description = "总承受伤害")
    @TableField(value = "TOTAL_DAMAGE_TAKEN")
    @Column(name = "TOTAL_DAMAGE_TAKEN", columnDefinition = "INT(10) COMMENT '总承受伤害'")
    private Integer totalDamageTaken;
    @Schema(description = "总承受物理伤害")
    @TableField(value = "PHYSICAL_DAMAGE_TAKEN")
    @Column(name = "PHYSICAL_DAMAGE_TAKEN", columnDefinition = "INT(10) COMMENT '总承受物理伤害'")
    private Integer physicalDamageTaken;
    @Schema(description = "总承受魔法伤害")
    @TableField(value = "MAGIC_DAMAGE_TAKEN")
    @Column(name = "MAGIC_DAMAGE_TAKEN", columnDefinition = "INT(10) COMMENT '总承受魔法伤害'")
    private Integer magicDamageTaken;
    @Schema(description = "购买消耗品数")
    @TableField(value = "CONSUMABLES_PURCHASED")
    @Column(name = "CONSUMABLES_PURCHASED", columnDefinition = "INT(10) COMMENT '购买消耗品数'")
    private Integer consumablesPurchased;
    @Schema(description = "视野得分")
    @TableField(value = "VISION_SCORE")
    @Column(name = "VISION_SCORE", columnDefinition = "INT(10) COMMENT '视野得分'")
    private Integer visionScore;
    @Schema(description = "插眼数")
    @TableField(value = "WARD_PLACED")
    @Column(name = "WARD_PLACED", columnDefinition = "INT(10) COMMENT '插眼数'")
    private Integer wardPlaced;
    @Schema(description = "排眼数")
    @TableField(value = "WARD_KILLED")
    @Column(name = "WARD_KILLED", columnDefinition = "INT(10) COMMENT '排眼数'")
    private Integer wardKilled;
    @Schema(description = "购买真眼数")
    @TableField(value = "VISION_WARDS_BOUGHT_IN_GAME")
    @Column(name = "VISION_WARDS_BOUGHT_IN_GAME", columnDefinition = "INT(10) COMMENT '购买真眼数'")
    private Integer visionWardsBoughtInGame;
    @Schema(description = "扫描到的眼的数量")
    @TableField(value = "WARD_PLACED_DETECTOR")
    @Column(name = "WARD_PLACED_DETECTOR", columnDefinition = "INT(10) COMMENT '扫描到的眼的数量'")
    private Integer wardPlacedDetector;
    @Schema(description = "金币获取数")
    @TableField(value = "GOLD_EARNED")
    @Column(name = "GOLD_EARNED", columnDefinition = "INT(10) COMMENT '金币获取数'")
    private Integer goldEarned;
    @Schema(description = "金币消费数")
    @TableField(value = "GOLD_SPENT")
    @Column(name = "GOLD_SPENT", columnDefinition = "INT(10) COMMENT '金币消费数'")
    private Integer goldSpent;
    @Schema(description = "击杀小兵数")
    @TableField(value = "MINIONS_KILLED")
    @Column(name = "MINIONS_KILLED", columnDefinition = "INT(10) COMMENT '击杀小兵数'")
    private Integer minionsKilled;
    @Schema(description = "击杀野怪数量")
    @TableField(value = "NEUTRAL_MINIONS_KILLED")
    @Column(name = "NEUTRAL_MINIONS_KILLED", columnDefinition = "INT(10) COMMENT '击杀野怪数量'")
    private Integer neutralMinionsKilled;
    @Schema(description = "推塔数")
    @TableField(value = "TURRETS_KILLED")
    @Column(name = "TURRETS_KILLED", columnDefinition = "INT(10) COMMENT '推塔数'")
    private Integer turretsKilled;
    @Schema(description = "破坏兵营数量")
    @TableField(value = "BARRACKS_KILLED")
    @Column(name = "BARRACKS_KILLED", columnDefinition = "INT(10) COMMENT '破坏兵营数量'")
    private Integer barracksKilled;
    @Schema(description = "死亡时间（秒）")
    @TableField(value = "TOTAL_TIME_SPENT_DEAD")
    @Column(name = "TOTAL_TIME_SPENT_DEAD", columnDefinition = "INT(10) COMMENT '死亡时间（秒）'")
    private Integer totalTimeSpentDead;
    @Schema(description = "经验值")
    @TableField(value = "EXP")
    @Column(name = "EXP", columnDefinition = "INT(10) COMMENT '经验值'")
    private Integer exp;
    @Schema(description = "游戏评分")
    @TableField(value = "GAME_SCORE")
    @Column(name = "GAME_SCORE", columnDefinition = "INT(10) COMMENT '游戏评分'")
    private Integer gameScore;
    @Schema(description = "基石符文ID")
    @TableField(value = "KEY_STONE_ID")
    @Column(name = "KEY_STONE_ID", columnDefinition = "INT(10) COMMENT '基石符文ID'")
    private Integer keyStoneId;
    @Schema(description = "装备栏1")
    @TableField(value = "ITEM0")
    @Column(name = "ITEM0", columnDefinition = "INT(10) COMMENT '装备栏1'")
    private Integer item0;
    @Schema(description = "装备栏2")
    @TableField(value = "ITEM1")
    @Column(name = "ITEM1", columnDefinition = "INT(10) COMMENT '装备栏2'")
    private Integer item1;
    @Schema(description = "装备栏3")
    @TableField(value = "ITEM2")
    @Column(name = "ITEM2", columnDefinition = "INT(10) COMMENT '装备栏3'")
    private Integer item2;
    @Schema(description = "装备栏4")
    @TableField(value = "ITEM3")
    @Column(name = "ITEM3", columnDefinition = "INT(10) COMMENT '装备栏4'")
    private Integer item3;
    @Schema(description = "装备栏5")
    @TableField(value = "ITEM4")
    @Column(name = "ITEM4", columnDefinition = "INT(10) COMMENT '装备栏5'")
    private Integer item4;
    @Schema(description = "装备栏6")
    @TableField(value = "ITEM5")
    @Column(name = "ITEM5", columnDefinition = "INT(10) COMMENT '装备栏6'")
    private Integer item5;
    @Schema(description = "装备栏7")
    @TableField(value = "ITEM6")
    @Column(name = "ITEM6", columnDefinition = "INT(10) COMMENT '装备栏7'")
    private Integer item6;
    @Schema(description = "Q技能使用次数")
    @TableField(value = "SPELL1_CAST")
    @Column(name = "SPELL1_CAST", columnDefinition = "INT(10) COMMENT 'Q技能使用次数'")
    private Integer spell1Cast;
    @Schema(description = "W技能使用次数")
    @TableField(value = "SPELL2_CAST")
    @Column(name = "SPELL2_CAST", columnDefinition = "INT(10) COMMENT 'W技能使用次数'")
    private Integer spell2Cast;
    @Schema(description = "E技能使用次数")
    @TableField(value = "SPELL3_CAST")
    @Column(name = "SPELL3_CAST", columnDefinition = "INT(10) COMMENT 'E技能使用次数'")
    private Integer spell3Cast;
    @Schema(description = "R技能使用次数")
    @TableField(value = "SPELL4_CAST")
    @Column(name = "SPELL4_CAST", columnDefinition = "INT(10) COMMENT 'R技能使用次数'")
    private Integer spell4Cast;

    @Schema(description = "对局基本信息")
    @TableField(exist = false)
    @ManyToOne(targetEntity = LolBattleHeaderPo.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    @JoinColumn(name = "GAME_ID", referencedColumnName = "GAME_ID", insertable = false, updatable = false)
    private LolBattleHeaderPo lolBattleHeaderPo;
    @Schema(description = "对局荣誉信息")
    @TableField(exist = false)
    @OneToOne(targetEntity = LolBattleHonourPo.class, mappedBy = "lolBattleChampionPo", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private LolBattleHonourPo lolBattleHonourPo;
}
